1. The Field of the Invention
This invention relates to systems, methods, and computer program products for communicating messages reliably using a request-response transport.
2. Background and Relevant Art
As computerized systems have increased in popularity, so did the needs to distribute files and processing resources of computer systems in networks both large and small. In general, computer systems and related devices communicate information over a network for a variety of reasons, for example, to exchange personal electronic messages, sell merchandise, provide account information, and so forth. One will appreciate, however, that as computer systems and their related applications have become increasingly more sophisticated, the challenges associated with sharing data and resources on a network have also increased.
Generally, there are a number of different mechanisms and protocols for distributing files and resources between two or more computer systems. For example, messages can be sent from one computer system to one or more other computer systems in a manner that does not necessarily require the other computer systems to respond. An example of this might be connectionless protocols, such as might be used with sending electronic mail messages, or streaming certain content to other computers using a user datagram protocol (“UDP”). Other methods for sharing files or resources can include use of connection-oriented protocols, such as those using a transmission control protocol (“TCP”). Connection-oriented communication typically involves establishing a connection through a series of requests and responses, and by sharing certain connection state information. Data sent to and received from the computers usually has some element that associates the transmitted data with the connection.
Connection-oriented communication has a number of advantages that distinguish it from connection-less communication for certain applications. For example, connections initiated using TCP provide a number of functions for ensuring that all the data have been received at one end, as well as a certain amount of error correction. For example, a sending computer can send a packet that indicates it is the first of 20 packets. After the receiving computer receives all 20 packets in the connection session, it submits an acknowledgement (or “ack”) to the sending computer system to indicate that all 20 packets were received. In some cases, the receiving computer system may even send an ack for each packet that it has received. In the case of using a reliable messaging (“RM”) mechanism, if the sending computer system does not receive an ack for each packet, or an ack for all 20 packets, the sending computer system may send the entire message again, or may even resend individual packets to the receiving computer as necessary.
As such, a number of different framing protocols, such as Hypertext Transfer Protocol (“HTTP”) and File Transfer Protocol (“FTP”) are each layered on top of connection-oriented transport protocols to take advantage of one or more of these aforementioned attributes. For example, when a client computer uses HTTP to retrieve information, the client computer establishes a TCP connection with the web server and sends an HTTP request for a resource, such as an HTML file or an image, or request that the web server takes a certain action, for example, in the case of online commerce where the client may ask the web server to purchase a song online and send it to the client. The web server receives the request and provides a corresponding response, which may include the contents of the requested file. After receiving the requested files, or when the client computer decides that the communication with the web server is completed, the client computer shuts down the TCP connection. As such, the client does not need to be addressable from the service's standpoint. For example, the client can be behind a Network Address Translation (NAT) server, or utilize an HTTP Proxy to bridge the connection across a firewall. Another benefit is that the requests and the responses are easily correlated—each response correlates to the request that preceded it.
Despite these and other advantages of request-response mechanisms, there is generally no particular way for a requesting or responding computer system to know that the information was transferred successfully. For example, a request may have reached the server, and the server may have produced a response, but the response was lost due to an HTTP Proxy error. Therefore, it is common in a conventional request-response mechanism for the requesting computer system to retransmit the request where no response has been received from the other computer system. For example, conventional web browsers often provide a “refresh” button that can be used to retry the HTTP request when a web page fails to load, In some cases, such as with a simple request for an Internet web page, repeating a seemingly failed request will not ordinarily have a detrimental effect. In other cases, such as with non-idempotent operations, repeating a seemingly failed request, or retransmitting a message that appears not to have been sent properly can have an aggregated effect, which may be detrimental. For example, a client computer might retransmit a money transfer request to a bank server due to no response from the bank server to indicate that the original money transfer was successful. The absence of a response does not necessarily indicate that the request was not received or processed. For example, the request might have been received and processed, but the response was lost due to a temporary network disconnection, or an HTTP Proxy failure. The bank might therefore double the amount of the money transfer upon retrying the request, though this was not intended by the client.
Difficulties such as these can be particularly acute in connections where the responding computer system (e.g., a bank server) cannot communicate directly with the requesting computer system (e.g., client bank customer) to let it know of the status of the request. For example, the client computer system might be communicating anonymously in the connection, or might be behind a firewall, or might be subject to a network address translation (“NAT”) service. In cases such as these, typically only the client, or requesting, computer system can initiate the communication. This can create difficulties for the responding computer system (e.g., a network server) in the event where it might be desirable to send receipt acknowledgements and response retransmissions to the requestor. In particular, there is presently no efficient mechanism in conventional request-response protocols for ensuring reliable message transfer between two or more computer systems, particularly such that does not aggregate the effect of messages where such an effect should not be aggregated, and that allows messages to be processed only in a particular order as desired.
Accordingly, systems, methods, and computer program products that ensure reliable request-response mechanisms would be an advantage in the art. In particular, an advantage can be realized with request-response mechanisms that allow efficient request and response messages, and corresponding acknowledgements of the same, between a requesting and responding computer system of a network connection. Furthermore, an advantage can be realized with efficient request-response mechanisms that can be implemented whether the address of the requesting computer can be identified, in a connection where the address is difficult or impossible to determine, or in cases where such address impossible to connect to from the server.